notice = FALSE;
} else if (find_ignore_stairs && has_flag(f_ptr->flags, FF_STAIRS)) {
notice = FALSE;
- } else if (has_flag(f_ptr->flags, FF_LAVA) && (is_immune_fire(creature_ptr) || is_invuln(creature_ptr))) {
+ } else if (has_flag(f_ptr->flags, FF_LAVA) && (has_immune_fire(creature_ptr) || is_invuln(creature_ptr))) {
notice = FALSE;
} 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)))) {
}
}
- if (has_flag(f_ptr->flags, FF_LAVA) && !is_invuln(creature_ptr) && !is_immune_fire(creature_ptr)) {
+ if (has_flag(f_ptr->flags, FF_LAVA) && !is_invuln(creature_ptr) && !has_immune_fire(creature_ptr)) {
int damage = 0;
if (has_flag(f_ptr->flags, FF_DEEP)) {
}
}
- if (has_flag(f_ptr->flags, FF_COLD_PUDDLE) && !is_invuln(creature_ptr) && !is_immune_cold(creature_ptr)) {
+ if (has_flag(f_ptr->flags, FF_COLD_PUDDLE) && !is_invuln(creature_ptr) && !has_immune_cold(creature_ptr)) {
int damage = 0;
if (has_flag(f_ptr->flags, FF_DEEP)) {
}
}
- if (has_flag(f_ptr->flags, FF_ELEC_PUDDLE) && !is_invuln(creature_ptr) && !is_immune_elec(creature_ptr)) {
+ if (has_flag(f_ptr->flags, FF_ELEC_PUDDLE) && !is_invuln(creature_ptr) && !has_immune_elec(creature_ptr)) {
int damage = 0;
if (has_flag(f_ptr->flags, FF_DEEP)) {
}
}
- if (has_flag(f_ptr->flags, FF_ACID_PUDDLE) && !is_invuln(creature_ptr) && !is_immune_acid(creature_ptr)) {
+ if (has_flag(f_ptr->flags, FF_ACID_PUDDLE) && !is_invuln(creature_ptr) && !has_immune_acid(creature_ptr)) {
int damage = 0;
if (has_flag(f_ptr->flags, FF_DEEP)) {
if (creature_ptr->riding) {
HIT_POINT damage;
- if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags2 & RF2_AURA_FIRE) && !is_immune_fire(creature_ptr)) {
+ if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags2 & RF2_AURA_FIRE) && !has_immune_fire(creature_ptr)) {
damage = r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].level / 2;
if (is_specific_player_race(creature_ptr, RACE_ENT))
damage += damage / 3;
msg_print(_("熱い!", "It's hot!"));
take_hit(creature_ptr, DAMAGE_NOESCAPE, damage, _("炎のオーラ", "Fire aura"), -1);
}
- if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags2 & RF2_AURA_ELEC) && !is_immune_elec(creature_ptr)) {
+ if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags2 & RF2_AURA_ELEC) && !has_immune_elec(creature_ptr)) {
damage = r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].level / 2;
if (is_specific_player_race(creature_ptr, RACE_ANDROID))
damage += damage / 3;
msg_print(_("痛い!", "It hurts!"));
take_hit(creature_ptr, DAMAGE_NOESCAPE, damage, _("電気のオーラ", "Elec aura"), -1);
}
- if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags3 & RF3_AURA_COLD) && !is_immune_cold(creature_ptr)) {
+ if ((r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].flags3 & RF3_AURA_COLD) && !has_immune_cold(creature_ptr)) {
damage = r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].level / 2;
if (creature_ptr->resist_cold)
damage = damage / 3;
(void)set_stun(target_ptr, target_ptr->stun + plus_stun);
}
- if (!(target_ptr->resist_fire || is_oppose_fire(target_ptr) || is_immune_fire(target_ptr)))
+ if (!(target_ptr->resist_fire || is_oppose_fire(target_ptr) || has_immune_fire(target_ptr)))
inventory_damage(target_ptr, set_acid_destroy, 3);
}
ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
if (!target_ptr->resist_shard || one_in_(13)) {
- if (!is_immune_fire(target_ptr))
+ if (!has_immune_fire(target_ptr))
inventory_damage(target_ptr, set_fire_destroy, 2);
inventory_damage(target_ptr, set_cold_destroy, 2);
}
}
if ((!(target_ptr->resist_cold || is_oppose_cold(target_ptr))) || one_in_(12)) {
- if (!is_immune_cold(target_ptr))
+ if (!has_immune_cold(target_ptr))
inventory_damage(target_ptr, set_cold_destroy, 3);
}
}
return FALSE;
}
- if (has_flag(f_ptr->flags, FF_LAVA) && !is_immune_fire(player_ptr) && !is_invuln(player_ptr)) {
+ if (has_flag(f_ptr->flags, FF_LAVA) && !has_immune_fire(player_ptr) && !is_invuln(player_ptr)) {
/* Always forbid deep lava */
if (has_flag(f_ptr->flags, FF_DEEP))
return FALSE;
if (is_oppose_acid(player_ptr))
m_ptr->smart |= SM_OPP_ACID;
- if (is_immune_acid(player_ptr))
+ if (has_immune_acid(player_ptr))
m_ptr->smart |= SM_IMM_ACID;
break;
if (is_oppose_elec(player_ptr))
m_ptr->smart |= SM_OPP_ELEC;
- if (is_immune_elec(player_ptr))
+ if (has_immune_elec(player_ptr))
m_ptr->smart |= SM_IMM_ELEC;
break;
if (is_oppose_fire(player_ptr))
m_ptr->smart |= SM_OPP_FIRE;
- if (is_immune_fire(player_ptr))
+ if (has_immune_fire(player_ptr))
m_ptr->smart |= SM_IMM_FIRE;
break;
if (is_oppose_cold(player_ptr))
m_ptr->smart |= SM_OPP_COLD;
- if (is_immune_cold(player_ptr))
+ if (has_immune_cold(player_ptr))
m_ptr->smart |= SM_IMM_COLD;
break;
if (is_oppose_acid(target_ptr))
msr_ptr->smart |= SM_OPP_ACID;
- if (is_immune_acid(target_ptr))
+ if (has_immune_acid(target_ptr))
msr_ptr->smart |= SM_IMM_ACID;
if (target_ptr->resist_elec)
if (is_oppose_elec(target_ptr))
msr_ptr->smart |= SM_OPP_ELEC;
- if (is_immune_elec(target_ptr))
+ if (has_immune_elec(target_ptr))
msr_ptr->smart |= SM_IMM_ELEC;
if (target_ptr->resist_fire)
if (is_oppose_fire(target_ptr))
msr_ptr->smart |= SM_OPP_FIRE;
- if (is_immune_fire(target_ptr))
+ if (has_immune_fire(target_ptr))
msr_ptr->smart |= SM_IMM_FIRE;
if (target_ptr->resist_cold)
if (is_oppose_cold(target_ptr))
msr_ptr->smart |= SM_OPP_COLD;
- if (is_immune_cold(target_ptr))
+ if (has_immune_cold(target_ptr))
msr_ptr->smart |= SM_IMM_COLD;
if (target_ptr->resist_pois)
monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (r_ptr->flags4 & RF4_BR_ACID) {
- if (!is_immune_acid(creature_ptr) && (creature_ptr->oppose_acid || music_singing(creature_ptr, MUSIC_RESIST)))
+ if (!has_immune_acid(creature_ptr) && (creature_ptr->oppose_acid || music_singing(creature_ptr, MUSIC_RESIST)))
return TRUE;
if (creature_ptr->special_defense & DEFENSE_ACID)
if (r_ptr->flags4 & RF4_BR_FIRE) {
if (!((creature_ptr->prace == RACE_BALROG) && creature_ptr->lev > 44)) {
- if (!is_immune_fire(creature_ptr) && (creature_ptr->oppose_fire || music_singing(creature_ptr, MUSIC_RESIST)))
+ if (!has_immune_fire(creature_ptr) && (creature_ptr->oppose_fire || music_singing(creature_ptr, MUSIC_RESIST)))
return TRUE;
if (creature_ptr->special_defense & DEFENSE_FIRE)
}
if (r_ptr->flags4 & RF4_BR_ELEC) {
- if (!is_immune_elec(creature_ptr) && (creature_ptr->oppose_elec || music_singing(creature_ptr, MUSIC_RESIST)))
+ if (!has_immune_elec(creature_ptr) && (creature_ptr->oppose_elec || music_singing(creature_ptr, MUSIC_RESIST)))
return TRUE;
if (creature_ptr->special_defense & DEFENSE_ELEC)
}
if (r_ptr->flags4 & RF4_BR_COLD) {
- if (!is_immune_cold(creature_ptr) && (creature_ptr->oppose_cold || music_singing(creature_ptr, MUSIC_RESIST)))
+ if (!has_immune_cold(creature_ptr) && (creature_ptr->oppose_cold || music_singing(creature_ptr, MUSIC_RESIST)))
return TRUE;
if (creature_ptr->special_defense & DEFENSE_COLD)
}
case SV_SCROLL_FIRE: {
fire_ball(creature_ptr, GF_FIRE, 0, 666, 4);
- if (!(is_oppose_fire(creature_ptr) || creature_ptr->resist_fire || is_immune_fire(creature_ptr)))
+ if (!(is_oppose_fire(creature_ptr) || creature_ptr->resist_fire || has_immune_fire(creature_ptr)))
take_hit(creature_ptr, DAMAGE_NOESCAPE, 50 + randint1(50), _("炎の巻物", "a Scroll of Fire"), -1);
ident = TRUE;
}
case SV_SCROLL_ICE: {
fire_ball(creature_ptr, GF_ICE, 0, 777, 4);
- if (!(is_oppose_cold(creature_ptr) || creature_ptr->resist_cold || is_immune_cold(creature_ptr)))
+ if (!(is_oppose_cold(creature_ptr) || creature_ptr->resist_cold || has_immune_cold(creature_ptr)))
take_hit(creature_ptr, DAMAGE_NOESCAPE, 100 + randint1(100), _("氷の巻物", "a Scroll of Ice"), -1);
ident = TRUE;
/* Vulnerability, resistance and immunity */
switch (typ) {
case GF_ELEC:
- if (is_immune_elec(target_ptr)) {
+ if (has_immune_elec(target_ptr)) {
ignore_wraith_form = TRUE;
}
dam = dam * calc_elec_damage_rate(target_ptr) / 100;
break;
case GF_ACID:
- if (is_immune_acid(target_ptr)) {
+ if (has_immune_acid(target_ptr)) {
ignore_wraith_form = TRUE;
}
dam = dam * calc_acid_damage_rate(target_ptr) / 100;
case GF_COLD:
case GF_ICE:
- if (is_immune_cold(target_ptr)) {
+ if (has_immune_cold(target_ptr)) {
ignore_wraith_form = TRUE;
}
dam = dam * calc_cold_damage_rate(target_ptr) / 100;
break;
case GF_FIRE:
- if (is_immune_fire(target_ptr)) {
+ if (has_immune_fire(target_ptr)) {
dam = 0;
ignore_wraith_form = TRUE;
break;
void set_element_resistance_info(player_type* creature_ptr, self_info_type* si_ptr)
{
- if (is_immune_acid(creature_ptr)) {
+ if (has_immune_acid(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\8e_\82É\91Î\82·\82é\8a®\91S\82È\82é\96Æ\89u\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are completely immune to acid.");
} else if (creature_ptr->resist_acid && is_oppose_acid(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\8e_\82Ö\82Ì\8b\97Í\82È\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You resist acid exceptionally well.");
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\8e_\82Ö\82Ì\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are resistant to acid.");
}
- if (is_immune_elec(creature_ptr)) {
+ if (has_immune_elec(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\93d\8c\82\82É\91Î\82·\82é\8a®\91S\82È\82é\96Æ\89u\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are completely immune to lightning.");
} else if (creature_ptr->resist_elec && is_oppose_elec(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\93d\8c\82\82Ö\82Ì\8b\97Í\82È\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You resist lightning exceptionally well.");
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\93d\8c\82\82Ö\82Ì\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are resistant to lightning.");
}
- if (is_specific_player_race(creature_ptr, RACE_ANDROID) && !is_immune_elec(creature_ptr)) {
+ if (is_specific_player_race(creature_ptr, RACE_ANDROID) && !has_immune_elec(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\93d\8c\82\82É\8eã\82¢\81B", "You are susceptible to damage from lightning.");
}
- if (is_immune_fire(creature_ptr)) {
+ if (has_immune_fire(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\89Î\82É\91Î\82·\82é\8a®\91S\82È\82é\96Æ\89u\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are completely immune to fire.");
} else if (creature_ptr->resist_fire && is_oppose_fire(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\89Î\82Ö\82Ì\8b\97Í\82È\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You resist fire exceptionally well.");
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\89Î\82Ö\82Ì\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are resistant to fire.");
}
- if (is_specific_player_race(creature_ptr, RACE_ENT) && !is_immune_fire(creature_ptr)) {
+ if (is_specific_player_race(creature_ptr, RACE_ENT) && !has_immune_fire(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\89Î\82É\8eã\82¢\81B", "You are susceptible to damage from fire.");
}
- if (is_immune_cold(creature_ptr)) {
+ if (has_immune_cold(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\97â\8bC\82É\91Î\82·\82é\8a®\91S\82È\82é\96Æ\89u\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You are completely immune to cold.");
} else if (creature_ptr->resist_cold && is_oppose_cold(creature_ptr)) {
si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Í\97â\8bC\82Ö\82Ì\8b\97Í\82È\91Ï\90«\82ð\8e\9d\82Á\82Ä\82¢\82é\81B", "You resist cold exceptionally well.");
bool double_resist = is_oppose_fire(creature_ptr);
/* Totally immune */
- if (is_immune_fire(creature_ptr) || (dam <= 0)) {
+ if (has_immune_fire(creature_ptr) || (dam <= 0)) {
learn_spell(creature_ptr, monspell);
return 0;
}
bool double_resist = is_oppose_cold(creature_ptr);
/* Total immunity */
- if (is_immune_cold(creature_ptr) || (dam <= 0)) {
+ if (has_immune_cold(creature_ptr) || (dam <= 0)) {
learn_spell(creature_ptr, monspell);
return 0;
}
*/
void touch_zap_player(monster_type *m_ptr, player_type *touched_ptr)
{
- process_aura_damage(m_ptr, touched_ptr, (bool)is_immune_fire(touched_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2),
+ process_aura_damage(m_ptr, touched_ptr, (bool)has_immune_fire(touched_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2),
RF2_AURA_FIRE,
fire_dam,
_("突然とても熱くなった!", "You are suddenly very hot!"));
- process_aura_damage(m_ptr, touched_ptr, (bool)is_immune_cold(touched_ptr), offsetof(monster_race, flags3), offsetof(monster_race, r_flags3),
+ process_aura_damage(m_ptr, touched_ptr, (bool)has_immune_cold(touched_ptr), offsetof(monster_race, flags3), offsetof(monster_race, r_flags3),
RF3_AURA_COLD,
cold_dam,
_("突然とても寒くなった!", "You are suddenly very cold!"));
- process_aura_damage(m_ptr, touched_ptr, (bool)is_immune_elec(touched_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2),
+ process_aura_damage(m_ptr, touched_ptr, (bool)has_immune_elec(touched_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2),
RF2_AURA_ELEC,
elec_dam,
_("電撃をくらった!", "You get zapped!"));
return TRUE;
break;
case TRAP_FIRE:
- if (is_immune_fire(creature_ptr))
+ if (has_immune_fire(creature_ptr))
return TRUE;
break;
case TRAP_ACID:
- if (is_immune_acid(creature_ptr))
+ if (has_immune_acid(creature_ptr))
return TRUE;
break;
case TRAP_BLIND:
/*!
* @brief クリーチャーが壁破壊進行を持っているかを返す。
*/
-bool is_kill_wall(player_type *creature_ptr)
+bool has_kill_wall(player_type *creature_ptr)
{
if (creature_ptr->mimic_form == MIMIC_DEMON_LORD || music_singing(creature_ptr, MUSIC_WALL)) {
return TRUE;
/*!
* @brief クリーチャーが壁通過を持っているかを返す。
*/
-bool is_pass_wall(player_type *creature_ptr)
+bool has_pass_wall(player_type *creature_ptr)
{
bool pow = FALSE;
/*!
* @brief クリーチャーが強力射を持っているかを返す。
*/
-BIT_FLAGS is_xtra_might(player_type *creature_ptr)
+BIT_FLAGS has_xtra_might(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_XTRA_MIGHT);
/*!
* @brief クリーチャーが邪悪感知を持っているかを返す。
*/
-BIT_FLAGS is_esp_evil(player_type *creature_ptr)
+BIT_FLAGS has_esp_evil(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (creature_ptr->realm1 == REALM_HEX) {
/*!
* @brief クリーチャーが自然界の動物感知を持っているかを返す。
*/
-BIT_FLAGS is_esp_animal(player_type *creature_ptr)
+BIT_FLAGS has_esp_animal(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_ANIMAL);
/*!
* @brief クリーチャーがアンデッド感知を持っているかを返す。
*/
-BIT_FLAGS is_esp_undead(player_type *creature_ptr)
+BIT_FLAGS has_esp_undead(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_UNDEAD);
return result;
}
-BIT_FLAGS is_esp_demon(player_type *creature_ptr)
+BIT_FLAGS has_esp_demon(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_DEMON);
return result;
}
-BIT_FLAGS is_esp_orc(player_type *creature_ptr)
+BIT_FLAGS has_esp_orc(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_ORC);
return result;
}
-BIT_FLAGS is_esp_troll(player_type *creature_ptr)
+BIT_FLAGS has_esp_troll(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_TROLL);
return result;
}
-BIT_FLAGS is_esp_giant(player_type *creature_ptr)
+BIT_FLAGS has_esp_giant(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_GIANT);
return result;
}
-BIT_FLAGS is_esp_dragon(player_type *creature_ptr)
+BIT_FLAGS has_esp_dragon(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_DRAGON);
return result;
}
-BIT_FLAGS is_esp_human(player_type *creature_ptr)
+BIT_FLAGS has_esp_human(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_HUMAN);
return result;
}
-BIT_FLAGS is_esp_good(player_type *creature_ptr)
+BIT_FLAGS has_esp_good(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_GOOD);
return result;
}
-BIT_FLAGS is_esp_nonliving(player_type *creature_ptr)
+BIT_FLAGS has_esp_nonliving(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_GOOD);
return result;
}
-BIT_FLAGS is_esp_unique(player_type *creature_ptr)
+BIT_FLAGS has_esp_unique(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= check_equipment_flags(creature_ptr, TR_ESP_UNIQUE);
return result;
}
-BIT_FLAGS is_esp_telepathy(player_type *creature_ptr)
+BIT_FLAGS has_esp_telepathy(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_sustain_str(player_type *creature_ptr)
+BIT_FLAGS has_sustain_str(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_sustain_int(player_type *creature_ptr)
+BIT_FLAGS has_sustain_int(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_sustain_wis(player_type *creature_ptr)
+BIT_FLAGS has_sustain_wis(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_sustain_dex(player_type *creature_ptr)
+BIT_FLAGS has_sustain_dex(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (creature_ptr->pclass == CLASS_BERSERKER) {
return result;
}
-BIT_FLAGS is_sustain_con(player_type *creature_ptr)
+BIT_FLAGS has_sustain_con(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (creature_ptr->pclass == CLASS_BERSERKER) {
return result;
}
-BIT_FLAGS is_sustain_chr(player_type *creature_ptr)
+BIT_FLAGS has_sustain_chr(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
}
}
-BIT_FLAGS is_resist_acid(player_type *creature_ptr)
+BIT_FLAGS has_resist_acid(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
result |= 0x01 << FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
- result |= is_immune_acid(creature_ptr);
+ result |= has_immune_acid(creature_ptr);
result |= check_equipment_flags(creature_ptr, TR_RES_ACID);
return result;
}
-BIT_FLAGS is_vuln_acid(player_type *creature_ptr)
+BIT_FLAGS has_vuln_acid(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (creature_ptr->muta3 & MUT3_VULN_ELEM) {
return result;
}
-BIT_FLAGS is_resist_elec(player_type *creature_ptr)
+BIT_FLAGS has_resist_elec(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
}
result |= check_equipment_flags(creature_ptr, TR_RES_ELEC);
- result |= is_immune_elec(creature_ptr);
+ result |= has_immune_elec(creature_ptr);
return result;
}
-BIT_FLAGS is_vuln_elec(player_type *creature_ptr)
+BIT_FLAGS has_vuln_elec(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (creature_ptr->muta3 & MUT3_VULN_ELEM) {
return result;
}
-BIT_FLAGS is_resist_fire(player_type *creature_ptr)
+BIT_FLAGS has_resist_fire(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
}
result |= check_equipment_flags(creature_ptr, TR_RES_FIRE);
- result |= is_immune_fire(creature_ptr);
+ result |= has_immune_fire(creature_ptr);
return result;
}
-BIT_FLAGS is_vuln_fire(player_type *creature_ptr)
+BIT_FLAGS has_vuln_fire(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (creature_ptr->muta3 & MUT3_VULN_ELEM) {
return result;
}
-BIT_FLAGS is_resist_cold(player_type *creature_ptr)
+BIT_FLAGS has_resist_cold(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
}
result |= check_equipment_flags(creature_ptr, TR_RES_COLD);
- result |= is_immune_cold(creature_ptr);
+ result |= has_immune_cold(creature_ptr);
return result;
}
-BIT_FLAGS is_vuln_cold(player_type *creature_ptr)
+BIT_FLAGS has_vuln_cold(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (creature_ptr->muta3 & MUT3_VULN_ELEM) {
return result;
}
-BIT_FLAGS is_resist_pois(player_type *creature_ptr)
+BIT_FLAGS has_resist_pois(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_conf(player_type *creature_ptr)
+BIT_FLAGS has_resist_conf(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_sound(player_type *creature_ptr)
+BIT_FLAGS has_resist_sound(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_lite(player_type *creature_ptr)
+BIT_FLAGS has_resist_lite(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_vuln_lite(player_type *creature_ptr)
+BIT_FLAGS has_vuln_lite(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (is_specific_player_race(creature_ptr, RACE_S_FAIRY) || is_specific_player_race(creature_ptr, RACE_VAMPIRE)
return result;
}
-BIT_FLAGS is_resist_dark(player_type *creature_ptr)
+BIT_FLAGS has_resist_dark(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_chaos(player_type *creature_ptr)
+BIT_FLAGS has_resist_chaos(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_disen(player_type *creature_ptr)
+BIT_FLAGS has_resist_disen(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_shard(player_type *creature_ptr)
+BIT_FLAGS has_resist_shard(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_nexus(player_type *creature_ptr)
+BIT_FLAGS has_resist_nexus(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_blind(player_type *creature_ptr)
+BIT_FLAGS has_resist_blind(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_neth(player_type *creature_ptr)
+BIT_FLAGS has_resist_neth(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_time(player_type *creature_ptr)
+BIT_FLAGS has_resist_time(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_water(player_type *creature_ptr)
+BIT_FLAGS has_resist_water(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_resist_fear(player_type *creature_ptr)
+BIT_FLAGS has_resist_fear(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_immune_acid(player_type *creature_ptr)
+BIT_FLAGS has_immune_acid(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_YEEK && creature_ptr->lev > 19)
return result;
}
-BIT_FLAGS is_immune_elec(player_type *creature_ptr)
+BIT_FLAGS has_immune_elec(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_immune_fire(player_type *creature_ptr)
+BIT_FLAGS has_immune_fire(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_immune_cold(player_type *creature_ptr)
+BIT_FLAGS has_immune_cold(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-BIT_FLAGS is_immune_dark(player_type *creature_ptr)
+BIT_FLAGS has_immune_dark(player_type *creature_ptr)
{
BIT_FLAGS result = 0L;
return result;
}
-bool is_disable_two_handed_bonus(player_type *creature_ptr, int i)
+bool has_disable_two_handed_bonus(player_type *creature_ptr, int i)
{
object_type *o_ptr;
o_ptr = &creature_ptr->inventory_list[INVEN_RARM + i];
return FALSE;
}
-bool is_icky_wield_weapon(player_type *creature_ptr, int i)
+bool has_icky_wield_weapon(player_type *creature_ptr, int i)
{
object_type *o_ptr;
BIT_FLAGS flgs[TR_FLAG_SIZE];
return TRUE;
}
}
- if (is_not_monk_weapon(creature_ptr, i) || is_not_ninja_weapon(creature_ptr, i)) {
+ if (has_not_monk_weapon(creature_ptr, i) || has_not_ninja_weapon(creature_ptr, i)) {
return TRUE;
}
return FALSE;
}
-bool is_riding_wield_weapon(player_type *creature_ptr, int i)
+bool has_riding_wield_weapon(player_type *creature_ptr, int i)
{
object_type *o_ptr;
BIT_FLAGS flgs[TR_FLAG_SIZE];
return FALSE;
}
-bool is_not_ninja_weapon(player_type *creature_ptr, int i)
+bool has_not_ninja_weapon(player_type *creature_ptr, int i)
{
tval_type tval = creature_ptr->inventory_list[INVEN_RARM + i].tval - TV_WEAPON_BEGIN;
OBJECT_SUBTYPE_VALUE sval = creature_ptr->inventory_list[INVEN_RARM + i].sval;
&& !((s_info[CLASS_NINJA].w_max[tval][sval] > WEAPON_EXP_BEGINNER) && (creature_ptr->inventory_list[INVEN_LARM - i].tval != TV_SHIELD));
}
-bool is_not_monk_weapon(player_type *creature_ptr, int i)
+bool has_not_monk_weapon(player_type *creature_ptr, int i)
{
tval_type tval = creature_ptr->inventory_list[INVEN_RARM + i].tval - TV_WEAPON_BEGIN;
OBJECT_SUBTYPE_VALUE sval = creature_ptr->inventory_list[INVEN_RARM + i].sval;
FLAG_CAUSE_MAX = 18
};
-bool is_pass_wall(player_type *creature_ptr);
-bool is_kill_wall(player_type *creature_ptr);
-BIT_FLAGS is_xtra_might(player_type *creature_ptr);
-BIT_FLAGS is_esp_evil(player_type *creature_ptr);
-BIT_FLAGS is_esp_animal(player_type *creature_ptr);
-BIT_FLAGS is_esp_undead(player_type *creature_ptr);
-BIT_FLAGS is_esp_demon(player_type *creature_ptr);
-BIT_FLAGS is_esp_orc(player_type *creature_ptr);
-BIT_FLAGS is_esp_troll(player_type *creature_ptr);
-BIT_FLAGS is_esp_giant(player_type *creature_ptr);
-BIT_FLAGS is_esp_dragon(player_type *creature_ptr);
-BIT_FLAGS is_esp_human(player_type *creature_ptr);
-BIT_FLAGS is_esp_good(player_type *creature_ptr);
-BIT_FLAGS is_esp_nonliving(player_type *creature_ptr);
-BIT_FLAGS is_esp_unique(player_type *creature_ptr);
-BIT_FLAGS is_esp_telepathy(player_type *creature_ptr);
+bool has_pass_wall(player_type *creature_ptr);
+bool has_kill_wall(player_type *creature_ptr);
+BIT_FLAGS has_xtra_might(player_type *creature_ptr);
+BIT_FLAGS has_esp_evil(player_type *creature_ptr);
+BIT_FLAGS has_esp_animal(player_type *creature_ptr);
+BIT_FLAGS has_esp_undead(player_type *creature_ptr);
+BIT_FLAGS has_esp_demon(player_type *creature_ptr);
+BIT_FLAGS has_esp_orc(player_type *creature_ptr);
+BIT_FLAGS has_esp_troll(player_type *creature_ptr);
+BIT_FLAGS has_esp_giant(player_type *creature_ptr);
+BIT_FLAGS has_esp_dragon(player_type *creature_ptr);
+BIT_FLAGS has_esp_human(player_type *creature_ptr);
+BIT_FLAGS has_esp_good(player_type *creature_ptr);
+BIT_FLAGS has_esp_nonliving(player_type *creature_ptr);
+BIT_FLAGS has_esp_unique(player_type *creature_ptr);
+BIT_FLAGS has_esp_telepathy(player_type *creature_ptr);
BIT_FLAGS has_bless_blade(player_type *creature_ptr);
BIT_FLAGS has_easy2_weapon(player_type *creature_ptr);
BIT_FLAGS has_down_saving(player_type *creature_ptr);
BIT_FLAGS has_see_inv(player_type *creature_ptr);
BIT_FLAGS has_magic_mastery(player_type *creature_ptr);
BIT_FLAGS has_free_act(player_type *creature_ptr);
-BIT_FLAGS is_sustain_str(player_type *creature_ptr);
-BIT_FLAGS is_sustain_int(player_type *creature_ptr);
-BIT_FLAGS is_sustain_wis(player_type *creature_ptr);
-BIT_FLAGS is_sustain_dex(player_type *creature_ptr);
-BIT_FLAGS is_sustain_con(player_type *creature_ptr);
-BIT_FLAGS is_sustain_chr(player_type *creature_ptr);
+BIT_FLAGS has_sustain_str(player_type *creature_ptr);
+BIT_FLAGS has_sustain_int(player_type *creature_ptr);
+BIT_FLAGS has_sustain_wis(player_type *creature_ptr);
+BIT_FLAGS has_sustain_dex(player_type *creature_ptr);
+BIT_FLAGS has_sustain_con(player_type *creature_ptr);
+BIT_FLAGS has_sustain_chr(player_type *creature_ptr);
BIT_FLAGS has_levitation(player_type *creature_ptr);
void has_can_swim(player_type *creature_ptr);
BIT_FLAGS has_slow_digest(player_type *creature_ptr);
void has_curses(player_type *creature_ptr);
BIT_FLAGS has_impact(player_type *creature_ptr);
void has_extra_blow(player_type *creature_ptr);
-BIT_FLAGS is_resist_acid(player_type *creature_ptr);
-BIT_FLAGS is_vuln_acid(player_type *creature_ptr);
-BIT_FLAGS is_resist_elec(player_type *creature_ptr);
-BIT_FLAGS is_vuln_elec(player_type *creature_ptr);
-BIT_FLAGS is_resist_fire(player_type *creature_ptr);
-BIT_FLAGS is_vuln_fire(player_type *creature_ptr);
-BIT_FLAGS is_resist_cold(player_type *creature_ptr);
-BIT_FLAGS is_vuln_cold(player_type *creature_ptr);
-BIT_FLAGS is_resist_pois(player_type *creature_ptr);
-BIT_FLAGS is_resist_conf(player_type *creature_ptr);
-BIT_FLAGS is_resist_sound(player_type *creature_ptr);
-BIT_FLAGS is_resist_lite(player_type *creature_ptr);
-BIT_FLAGS is_vuln_lite(player_type *creature_ptr);
-BIT_FLAGS is_resist_dark(player_type *creature_ptr);
-BIT_FLAGS is_resist_chaos(player_type *creature_ptr);
-BIT_FLAGS is_resist_disen(player_type *creature_ptr);
-BIT_FLAGS is_resist_shard(player_type *creature_ptr);
-BIT_FLAGS is_resist_nexus(player_type *creature_ptr);
-BIT_FLAGS is_resist_blind(player_type *creature_ptr);
-BIT_FLAGS is_resist_neth(player_type *creature_ptr);
-BIT_FLAGS is_resist_time(player_type *creature_ptr);
-BIT_FLAGS is_resist_water(player_type *creature_ptr);
-BIT_FLAGS is_resist_fear(player_type *creature_ptr);
-BIT_FLAGS is_immune_acid(player_type *creature_ptr);
-BIT_FLAGS is_immune_elec(player_type *creature_ptr);
-BIT_FLAGS is_immune_fire(player_type *creature_ptr);
-BIT_FLAGS is_immune_cold(player_type *creature_ptr);
-BIT_FLAGS is_immune_dark(player_type *creature_ptr);
+BIT_FLAGS has_resist_acid(player_type *creature_ptr);
+BIT_FLAGS has_vuln_acid(player_type *creature_ptr);
+BIT_FLAGS has_resist_elec(player_type *creature_ptr);
+BIT_FLAGS has_vuln_elec(player_type *creature_ptr);
+BIT_FLAGS has_resist_fire(player_type *creature_ptr);
+BIT_FLAGS has_vuln_fire(player_type *creature_ptr);
+BIT_FLAGS has_resist_cold(player_type *creature_ptr);
+BIT_FLAGS has_vuln_cold(player_type *creature_ptr);
+BIT_FLAGS has_resist_pois(player_type *creature_ptr);
+BIT_FLAGS has_resist_conf(player_type *creature_ptr);
+BIT_FLAGS has_resist_sound(player_type *creature_ptr);
+BIT_FLAGS has_resist_lite(player_type *creature_ptr);
+BIT_FLAGS has_vuln_lite(player_type *creature_ptr);
+BIT_FLAGS has_resist_dark(player_type *creature_ptr);
+BIT_FLAGS has_resist_chaos(player_type *creature_ptr);
+BIT_FLAGS has_resist_disen(player_type *creature_ptr);
+BIT_FLAGS has_resist_shard(player_type *creature_ptr);
+BIT_FLAGS has_resist_nexus(player_type *creature_ptr);
+BIT_FLAGS has_resist_blind(player_type *creature_ptr);
+BIT_FLAGS has_resist_neth(player_type *creature_ptr);
+BIT_FLAGS has_resist_time(player_type *creature_ptr);
+BIT_FLAGS has_resist_water(player_type *creature_ptr);
+BIT_FLAGS has_resist_fear(player_type *creature_ptr);
+BIT_FLAGS has_immune_acid(player_type *creature_ptr);
+BIT_FLAGS has_immune_elec(player_type *creature_ptr);
+BIT_FLAGS has_immune_fire(player_type *creature_ptr);
+BIT_FLAGS has_immune_cold(player_type *creature_ptr);
+BIT_FLAGS has_immune_dark(player_type *creature_ptr);
bool has_right_hand_weapon(player_type *creature_ptr);
bool has_left_hand_weapon(player_type *creature_ptr);
bool has_two_handed_weapons(player_type *creature_ptr);
BIT_FLAGS has_lite(player_type *creature_ptr);
-bool is_disable_two_handed_bonus(player_type *creature_ptr, int i);
-bool is_not_ninja_weapon(player_type *creature_ptr, int i);
-bool is_not_monk_weapon(player_type *creature_ptr, int i);
-bool is_icky_wield_weapon(player_type *creature_ptr, int i);
-bool is_riding_wield_weapon(player_type *creature_ptr, int i);
+bool has_disable_two_handed_bonus(player_type *creature_ptr, int i);
+bool has_not_ninja_weapon(player_type *creature_ptr, int i);
+bool has_not_monk_weapon(player_type *creature_ptr, int i);
+bool has_icky_wield_weapon(player_type *creature_ptr, int i);
+bool has_riding_wield_weapon(player_type *creature_ptr, int i);
bool has_good_luck(player_type *creature_ptr);
PERCENTAGE per = 100;
int i;
- if (is_immune_acid(creature_ptr)) {
+ if (has_immune_acid(creature_ptr)) {
return 0;
}
- BIT_FLAGS flgs = is_vuln_acid(creature_ptr);
+ BIT_FLAGS flgs = has_vuln_acid(creature_ptr);
for (i = 0; i < FLAG_CAUSE_MAX; i++) {
if (flgs & (0x01 << i)) {
if (i == FLAG_CAUSE_MUTATION) {
PERCENTAGE per = 100;
int i;
- if (is_immune_elec(creature_ptr)) {
+ if (has_immune_elec(creature_ptr)) {
return 0;
}
- BIT_FLAGS flgs = is_vuln_elec(creature_ptr);
+ BIT_FLAGS flgs = has_vuln_elec(creature_ptr);
for (i = 0; i < FLAG_CAUSE_MAX; i++) {
if (flgs & (0x01 << i)) {
if (i == FLAG_CAUSE_MUTATION) {
{
PERCENTAGE per = 100;
int i;
- BIT_FLAGS flgs = is_vuln_fire(creature_ptr);
+ BIT_FLAGS flgs = has_vuln_fire(creature_ptr);
for (i = 0; i < FLAG_CAUSE_MAX; i++) {
if (flgs & (0x01 << i)) {
if (i == FLAG_CAUSE_MUTATION) {
{
PERCENTAGE per = 100;
int i;
- BIT_FLAGS flgs = is_vuln_cold(creature_ptr);
+ BIT_FLAGS flgs = has_vuln_cold(creature_ptr);
for (i = 0; i < FLAG_CAUSE_MAX; i++) {
if (flgs & (0x01 << i)) {
if (i == FLAG_CAUSE_MUTATION) {
ARMOUR_CLASS old_dis_ac = creature_ptr->dis_ac;
ARMOUR_CLASS old_dis_to_a = creature_ptr->dis_to_a;
- creature_ptr->pass_wall = is_pass_wall(creature_ptr);
- creature_ptr->kill_wall = is_kill_wall(creature_ptr);
- creature_ptr->xtra_might = is_xtra_might(creature_ptr);
- creature_ptr->esp_evil = is_esp_evil(creature_ptr);
- creature_ptr->esp_animal = is_esp_animal(creature_ptr);
- creature_ptr->esp_undead = is_esp_undead(creature_ptr);
- creature_ptr->esp_demon = is_esp_demon(creature_ptr);
- creature_ptr->esp_orc = is_esp_orc(creature_ptr);
- creature_ptr->esp_troll = is_esp_troll(creature_ptr);
- creature_ptr->esp_giant = is_esp_giant(creature_ptr);
- creature_ptr->esp_dragon = is_esp_dragon(creature_ptr);
- creature_ptr->esp_human = is_esp_human(creature_ptr);
- creature_ptr->esp_good = is_esp_good(creature_ptr);
- creature_ptr->esp_nonliving = is_esp_nonliving(creature_ptr);
- creature_ptr->esp_unique = is_esp_unique(creature_ptr);
- creature_ptr->telepathy = is_esp_telepathy(creature_ptr);
+ creature_ptr->pass_wall = has_pass_wall(creature_ptr);
+ creature_ptr->kill_wall = has_kill_wall(creature_ptr);
+ creature_ptr->xtra_might = has_xtra_might(creature_ptr);
+ creature_ptr->esp_evil = has_esp_evil(creature_ptr);
+ creature_ptr->esp_animal = has_esp_animal(creature_ptr);
+ creature_ptr->esp_undead = has_esp_undead(creature_ptr);
+ creature_ptr->esp_demon = has_esp_demon(creature_ptr);
+ creature_ptr->esp_orc = has_esp_orc(creature_ptr);
+ creature_ptr->esp_troll = has_esp_troll(creature_ptr);
+ creature_ptr->esp_giant = has_esp_giant(creature_ptr);
+ creature_ptr->esp_dragon = has_esp_dragon(creature_ptr);
+ creature_ptr->esp_human = has_esp_human(creature_ptr);
+ creature_ptr->esp_good = has_esp_good(creature_ptr);
+ creature_ptr->esp_nonliving = has_esp_nonliving(creature_ptr);
+ creature_ptr->esp_unique = has_esp_unique(creature_ptr);
+ creature_ptr->telepathy = has_esp_telepathy(creature_ptr);
creature_ptr->bless_blade = has_bless_blade(creature_ptr);
creature_ptr->easy_2weapon = has_easy2_weapon(creature_ptr);
creature_ptr->down_saving = has_down_saving(creature_ptr);
creature_ptr->hold_exp = has_hold_exp(creature_ptr);
creature_ptr->see_inv = has_see_inv(creature_ptr);
creature_ptr->free_act = has_free_act(creature_ptr);
- creature_ptr->sustain_str = is_sustain_str(creature_ptr);
- creature_ptr->sustain_int = is_sustain_int(creature_ptr);
- creature_ptr->sustain_wis = is_sustain_wis(creature_ptr);
- creature_ptr->sustain_dex = is_sustain_dex(creature_ptr);
- creature_ptr->sustain_con = is_sustain_con(creature_ptr);
- creature_ptr->sustain_chr = is_sustain_chr(creature_ptr);
+ creature_ptr->sustain_str = has_sustain_str(creature_ptr);
+ creature_ptr->sustain_int = has_sustain_int(creature_ptr);
+ creature_ptr->sustain_wis = has_sustain_wis(creature_ptr);
+ creature_ptr->sustain_dex = has_sustain_dex(creature_ptr);
+ creature_ptr->sustain_con = has_sustain_con(creature_ptr);
+ creature_ptr->sustain_chr = has_sustain_chr(creature_ptr);
creature_ptr->levitation = has_levitation(creature_ptr);
has_can_swim(creature_ptr);
creature_ptr->slow_digest = has_slow_digest(creature_ptr);
has_curses(creature_ptr);
creature_ptr->impact = has_impact(creature_ptr);
has_extra_blow(creature_ptr);
- creature_ptr->resist_acid = is_resist_acid(creature_ptr);
- creature_ptr->resist_elec = is_resist_elec(creature_ptr);
- creature_ptr->resist_fire = is_resist_fire(creature_ptr);
- creature_ptr->resist_cold = is_resist_cold(creature_ptr);
- creature_ptr->resist_pois = is_resist_pois(creature_ptr);
- creature_ptr->resist_conf = is_resist_conf(creature_ptr);
- creature_ptr->resist_sound = is_resist_sound(creature_ptr);
- creature_ptr->resist_lite = is_resist_lite(creature_ptr);
- creature_ptr->resist_dark = is_resist_dark(creature_ptr);
- creature_ptr->resist_chaos = is_resist_chaos(creature_ptr);
- creature_ptr->resist_disen = is_resist_disen(creature_ptr);
- creature_ptr->resist_shard = is_resist_shard(creature_ptr);
- creature_ptr->resist_nexus = is_resist_nexus(creature_ptr);
- creature_ptr->resist_blind = is_resist_blind(creature_ptr);
- creature_ptr->resist_neth = is_resist_neth(creature_ptr);
- creature_ptr->resist_time = is_resist_time(creature_ptr);
- creature_ptr->resist_fear = is_resist_fear(creature_ptr);
- creature_ptr->resist_time = is_resist_time(creature_ptr);
- creature_ptr->resist_water = is_resist_water(creature_ptr);
+ creature_ptr->resist_acid = has_resist_acid(creature_ptr);
+ creature_ptr->resist_elec = has_resist_elec(creature_ptr);
+ creature_ptr->resist_fire = has_resist_fire(creature_ptr);
+ creature_ptr->resist_cold = has_resist_cold(creature_ptr);
+ creature_ptr->resist_pois = has_resist_pois(creature_ptr);
+ creature_ptr->resist_conf = has_resist_conf(creature_ptr);
+ creature_ptr->resist_sound = has_resist_sound(creature_ptr);
+ creature_ptr->resist_lite = has_resist_lite(creature_ptr);
+ creature_ptr->resist_dark = has_resist_dark(creature_ptr);
+ creature_ptr->resist_chaos = has_resist_chaos(creature_ptr);
+ creature_ptr->resist_disen = has_resist_disen(creature_ptr);
+ creature_ptr->resist_shard = has_resist_shard(creature_ptr);
+ creature_ptr->resist_nexus = has_resist_nexus(creature_ptr);
+ creature_ptr->resist_blind = has_resist_blind(creature_ptr);
+ creature_ptr->resist_neth = has_resist_neth(creature_ptr);
+ creature_ptr->resist_time = has_resist_time(creature_ptr);
+ creature_ptr->resist_fear = has_resist_fear(creature_ptr);
+ creature_ptr->resist_time = has_resist_time(creature_ptr);
+ creature_ptr->resist_water = has_resist_water(creature_ptr);
creature_ptr->lite = has_lite(creature_ptr);
}
for (int i = 0; i < 2; i++) {
- creature_ptr->icky_wield[i] = is_icky_wield_weapon(creature_ptr, i);
- creature_ptr->riding_wield[i] = is_riding_wield_weapon(creature_ptr, i);
+ creature_ptr->icky_wield[i] = has_icky_wield_weapon(creature_ptr, i);
+ creature_ptr->riding_wield[i] = has_riding_wield_weapon(creature_ptr, i);
creature_ptr->num_blow[i] = calc_num_blow(creature_ptr, i);
creature_ptr->to_dd[i] = calc_to_weapon_dice_num(creature_ptr, INVEN_RARM + i);
creature_ptr->to_ds[i] = calc_to_weapon_dice_side(creature_ptr, INVEN_RARM + i);
div = ((o_ptr->weight < wgt) ? wgt : o_ptr->weight);
str_index = (adj_str_blow[creature_ptr->stat_ind[A_STR]] * mul / div);
- if (has_two_handed_weapons(creature_ptr) && !is_disable_two_handed_bonus(creature_ptr, 0))
+ if (has_two_handed_weapons(creature_ptr) && !has_disable_two_handed_bonus(creature_ptr, 0))
str_index++;
if (creature_ptr->pclass == CLASS_NINJA)
str_index = MAX(0, str_index - 1);
num_blow += 1 + creature_ptr->extra_blows[0];
}
- if (is_not_ninja_weapon(creature_ptr, i)) {
+ if (has_not_ninja_weapon(creature_ptr, i)) {
num_blow /= 2;
if (num_blow < 1)
num_blow = 1;
if (get_default_hand(creature_ptr) == id) {
if ((is_martial_arts_mode(creature_ptr) && empty_hands(creature_ptr, FALSE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM))
- || !is_disable_two_handed_bonus(creature_ptr, 0)) {
+ || !has_disable_two_handed_bonus(creature_ptr, 0)) {
int bonus_to_d = 0;
bonus_to_d = ((int)(adj_str_td[creature_ptr->stat_ind[A_STR]]) - 128) / 2;
damage += MAX(bonus_to_d, 1);
hit += (creature_ptr->weapon_exp[tval][sval] - WEAPON_EXP_BEGINNER) / 200;
- if (is_not_ninja_weapon(creature_ptr, id) || is_not_monk_weapon(creature_ptr, id)) {
+ if (has_not_ninja_weapon(creature_ptr, id) || has_not_monk_weapon(creature_ptr, id)) {
hit -= 40;
}
}
if ((is_martial_arts_mode(creature_ptr) && empty_hands(creature_ptr, FALSE) == (EMPTY_HAND_RARM | EMPTY_HAND_LARM))
- || !is_disable_two_handed_bonus(creature_ptr, 0)) {
+ || !has_disable_two_handed_bonus(creature_ptr, 0)) {
int bonus_to_h = 0;
bonus_to_h = ((int)(adj_str_th[creature_ptr->stat_ind[A_STR]]) - 128) + ((int)(adj_dex_th[creature_ptr->stat_ind[A_DEX]]) - 128);
hit += MAX(bonus_to_h, 1);
if ((attacker_ptr->align < 0) && (*magnification < 20))
*magnification = 20;
- if (!(attacker_ptr->resist_acid || is_oppose_acid(attacker_ptr) || is_immune_acid(attacker_ptr)) && (*magnification < 25))
+ if (!(attacker_ptr->resist_acid || is_oppose_acid(attacker_ptr) || has_immune_acid(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_elec || is_oppose_elec(attacker_ptr) || is_immune_elec(attacker_ptr)) && (*magnification < 25))
+ if (!(attacker_ptr->resist_elec || is_oppose_elec(attacker_ptr) || has_immune_elec(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_fire || is_oppose_fire(attacker_ptr) || is_immune_fire(attacker_ptr)) && (*magnification < 25))
+ if (!(attacker_ptr->resist_fire || is_oppose_fire(attacker_ptr) || has_immune_fire(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_cold || is_oppose_cold(attacker_ptr) || is_immune_cold(attacker_ptr)) && (*magnification < 25))
+ if (!(attacker_ptr->resist_cold || is_oppose_cold(attacker_ptr) || has_immune_cold(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
if (!(attacker_ptr->resist_pois || is_oppose_pois(attacker_ptr)) && (*magnification < 25))