if (trap & (CHEST_POISON))
{
msg_print(_("突如吹き出した緑色のガスに包み込まれた!", "A puff of green gas surrounds you!"));
- if (!(target_ptr->resist_pois || IS_OPPOSE_POIS()))
+ if (!(target_ptr->resist_pois || is_oppose_pois(target_ptr)))
{
(void)set_poisoned(target_ptr, target_ptr->poisoned + 10 + randint1(20));
}
{
case SV_FOOD_POISON:
{
- if (!(creature_ptr->resist_pois || IS_OPPOSE_POIS()))
+ if (!(creature_ptr->resist_pois || is_oppose_pois(creature_ptr)))
{
if (set_poisoned(creature_ptr, creature_ptr->poisoned + randint0(10) + 10))
{
break;
case SV_POTION_POISON:
- if (!(creature_ptr->resist_pois || IS_OPPOSE_POIS()))
+ if (!(creature_ptr->resist_pois || is_oppose_pois(creature_ptr)))
{
if (set_poisoned(creature_ptr, creature_ptr->poisoned + randint0(15) + 10))
{
{
fire_ball(creature_ptr, GF_FIRE, 0, 666, 4);
/* Note: "Double" damage since it is centered on the player ... */
- if (!(IS_OPPOSE_FIRE() || creature_ptr->resist_fire || creature_ptr->immune_fire))
+ if (!(is_oppose_fire(creature_ptr) || creature_ptr->resist_fire || creature_ptr->immune_fire))
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->resist_cold || creature_ptr->immune_cold))
+ if (!(is_oppose_cold(creature_ptr) || creature_ptr->resist_cold || creature_ptr->immune_cold))
take_hit(creature_ptr, DAMAGE_NOESCAPE, 100+randint1(100), _("氷の巻物", "a Scroll of Ice"), -1);
ident = TRUE;
if (attacker_ptr->align < 0 && mult < 20)
mult = 20;
- if (!(attacker_ptr->resist_acid || IS_OPPOSE_ACID() || attacker_ptr->immune_acid) && (mult < 25))
+ if (!(attacker_ptr->resist_acid || is_oppose_acid(attacker_ptr) || attacker_ptr->immune_acid) && (mult < 25))
mult = 25;
- if (!(attacker_ptr->resist_elec || IS_OPPOSE_ELEC() || attacker_ptr->immune_elec) && (mult < 25))
+ if (!(attacker_ptr->resist_elec || is_oppose_elec(attacker_ptr) || attacker_ptr->immune_elec) && (mult < 25))
mult = 25;
- if (!(attacker_ptr->resist_fire || IS_OPPOSE_FIRE() || attacker_ptr->immune_fire) && (mult < 25))
+ if (!(attacker_ptr->resist_fire || is_oppose_fire(attacker_ptr) || attacker_ptr->immune_fire) && (mult < 25))
mult = 25;
- if (!(attacker_ptr->resist_cold || IS_OPPOSE_COLD() || attacker_ptr->immune_cold) && (mult < 25))
+ if (!(attacker_ptr->resist_cold || is_oppose_cold(attacker_ptr) || attacker_ptr->immune_cold) && (mult < 25))
mult = 25;
- if (!(attacker_ptr->resist_pois || IS_OPPOSE_POIS()) && (mult < 25))
+ if (!(attacker_ptr->resist_pois || is_oppose_pois(attacker_ptr)) && (mult < 25))
mult = 25;
if ((attacker_ptr->pclass != CLASS_SAMURAI) && (have_flag(flgs_aux, TR_FORCE_WEAPON)) && (attacker_ptr->csp >(attacker_ptr->msp / 30)))
if (explode) break;
/* Take "poison" effect */
- if (!(target_ptr->resist_pois || IS_OPPOSE_POIS()) && !CHECK_MULTISHADOW(target_ptr))
+ if (!(target_ptr->resist_pois || is_oppose_pois(target_ptr)) && !CHECK_MULTISHADOW(target_ptr))
{
if (set_poisoned(target_ptr, target_ptr->poisoned + randint1(rlev) + 5))
{
if (target_ptr->is_dead || CHECK_MULTISHADOW(target_ptr)) break;
/* Take "poison" effect */
- if (!(target_ptr->resist_pois || IS_OPPOSE_POIS()))
+ if (!(target_ptr->resist_pois || is_oppose_pois(target_ptr)))
{
if (set_poisoned(target_ptr, target_ptr->poisoned + randint1(rlev) + 5))
{
{
if(PRACE_IS_(creature_ptr, RACE_ENT)) damage += damage / 3;
if(creature_ptr->resist_fire) damage = damage / 3;
- if(IS_OPPOSE_FIRE()) damage = damage / 3;
+ if(is_oppose_fire(creature_ptr)) damage = damage / 3;
if(creature_ptr->levitation) damage = damage / 5;
damage = damage / 100 + (randint0(100) < (damage % 100));
if (damage)
{
if (creature_ptr->resist_cold) damage = damage / 3;
- if (IS_OPPOSE_COLD()) damage = damage / 3;
+ if (is_oppose_cold(creature_ptr)) damage = damage / 3;
if (creature_ptr->levitation) damage = damage / 5;
damage = damage / 100 + (randint0(100) < (damage % 100));
if (damage)
{
if (creature_ptr->resist_elec) damage = damage / 3;
- if (IS_OPPOSE_ELEC()) damage = damage / 3;
+ if (is_oppose_elec(creature_ptr)) damage = damage / 3;
if (creature_ptr->levitation) damage = damage / 5;
damage = damage / 100 + (randint0(100) < (damage % 100));
if (damage)
{
if (creature_ptr->resist_acid) damage = damage / 3;
- if (IS_OPPOSE_ACID()) damage = damage / 3;
+ if (is_oppose_acid(creature_ptr)) damage = damage / 3;
if (creature_ptr->levitation) damage = damage / 5;
damage = damage / 100 + (randint0(100) < (damage % 100));
if (damage)
{
if (creature_ptr->resist_pois) damage = damage / 3;
- if (IS_OPPOSE_POIS()) damage = damage / 3;
+ if (is_oppose_pois(creature_ptr)) damage = damage / 3;
if (creature_ptr->levitation) damage = damage / 5;
damage = damage / 100 + (randint0(100) < (damage % 100));
damage = r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].level / 2;
if (PRACE_IS_(creature_ptr, RACE_ENT)) damage += damage / 3;
if (creature_ptr->resist_fire) damage = damage / 3;
- if (IS_OPPOSE_FIRE()) damage = damage / 3;
+ if (is_oppose_fire(creature_ptr)) damage = damage / 3;
msg_print(_("熱い!", "It's hot!"));
take_hit(creature_ptr, DAMAGE_NOESCAPE, damage, _("炎のオーラ", "Fire aura"), -1);
}
damage = r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx].level / 2;
if (PRACE_IS_(creature_ptr, RACE_ANDROID)) damage += damage / 3;
if (creature_ptr->resist_elec) damage = damage / 3;
- if (IS_OPPOSE_ELEC()) damage = damage / 3;
+ if (is_oppose_elec(creature_ptr)) damage = damage / 3;
msg_print(_("痛い!", "It hurts!"));
take_hit(creature_ptr, DAMAGE_NOESCAPE, damage, _("電気のオーラ", "Elec aura"), -1);
}
{
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;
- if (IS_OPPOSE_COLD()) damage = damage / 3;
+ if (is_oppose_cold(creature_ptr)) damage = damage / 3;
msg_print(_("冷たい!", "It's cold!"));
take_hit(creature_ptr, DAMAGE_NOESCAPE, damage, _("冷気のオーラ", "Cold aura"), -1);
}
if (IS_FAST(creature_ptr) || creature_ptr->slow)
add_flag(flgs, TR_SPEED);
- if (IS_OPPOSE_ACID() && !(creature_ptr->special_defense & DEFENSE_ACID) && !(PRACE_IS_(creature_ptr, RACE_YEEK) && (creature_ptr->lev > 19)))
+ if (is_oppose_acid(creature_ptr) && !(creature_ptr->special_defense & DEFENSE_ACID) && !(PRACE_IS_(creature_ptr, RACE_YEEK) && (creature_ptr->lev > 19)))
add_flag(flgs, TR_RES_ACID);
- if (IS_OPPOSE_ELEC() && !(creature_ptr->special_defense & DEFENSE_ELEC))
+ if (is_oppose_elec(creature_ptr) && !(creature_ptr->special_defense & DEFENSE_ELEC))
add_flag(flgs, TR_RES_ELEC);
- if (IS_OPPOSE_FIRE() && !(creature_ptr->special_defense & DEFENSE_FIRE))
+ if (is_oppose_fire(creature_ptr) && !(creature_ptr->special_defense & DEFENSE_FIRE))
add_flag(flgs, TR_RES_FIRE);
- if (IS_OPPOSE_COLD() && !(creature_ptr->special_defense & DEFENSE_COLD))
+ if (is_oppose_cold(creature_ptr) && !(creature_ptr->special_defense & DEFENSE_COLD))
add_flag(flgs, TR_RES_COLD);
- if (IS_OPPOSE_POIS())
+ if (is_oppose_pois(creature_ptr))
add_flag(flgs, TR_RES_POIS);
if (creature_ptr->special_attack & ATTACK_ACID)
{
case DRS_ACID:
if (p_ptr->resist_acid) m_ptr->smart |= (SM_RES_ACID);
- if (IS_OPPOSE_ACID()) m_ptr->smart |= (SM_OPP_ACID);
+ if (is_oppose_acid(p_ptr)) m_ptr->smart |= (SM_OPP_ACID);
if (p_ptr->immune_acid) m_ptr->smart |= (SM_IMM_ACID);
break;
case DRS_ELEC:
if (p_ptr->resist_elec) m_ptr->smart |= (SM_RES_ELEC);
- if (IS_OPPOSE_ELEC()) m_ptr->smart |= (SM_OPP_ELEC);
+ if (is_oppose_elec(p_ptr)) m_ptr->smart |= (SM_OPP_ELEC);
if (p_ptr->immune_elec) m_ptr->smart |= (SM_IMM_ELEC);
break;
case DRS_FIRE:
if (p_ptr->resist_fire) m_ptr->smart |= (SM_RES_FIRE);
- if (IS_OPPOSE_FIRE()) m_ptr->smart |= (SM_OPP_FIRE);
+ if (is_oppose_fire(p_ptr)) m_ptr->smart |= (SM_OPP_FIRE);
if (p_ptr->immune_fire) m_ptr->smart |= (SM_IMM_FIRE);
break;
case DRS_COLD:
if (p_ptr->resist_cold) m_ptr->smart |= (SM_RES_COLD);
- if (IS_OPPOSE_COLD()) m_ptr->smart |= (SM_OPP_COLD);
+ if (is_oppose_cold(p_ptr)) m_ptr->smart |= (SM_OPP_COLD);
if (p_ptr->immune_cold) m_ptr->smart |= (SM_IMM_COLD);
break;
case DRS_POIS:
if (p_ptr->resist_pois) m_ptr->smart |= (SM_RES_POIS);
- if (IS_OPPOSE_POIS()) m_ptr->smart |= (SM_OPP_POIS);
+ if (is_oppose_pois(p_ptr)) m_ptr->smart |= (SM_OPP_POIS);
break;
/* Cheat if requested */
if (smart_cheat)
{
- /* Know basic info */
+ /* Know element info */
if (target_ptr->resist_acid) smart |= (SM_RES_ACID);
- if (IS_OPPOSE_ACID()) smart |= (SM_OPP_ACID);
+ if (is_oppose_acid(target_ptr)) smart |= (SM_OPP_ACID);
if (target_ptr->immune_acid) smart |= (SM_IMM_ACID);
if (target_ptr->resist_elec) smart |= (SM_RES_ELEC);
- if (IS_OPPOSE_ELEC()) smart |= (SM_OPP_ELEC);
+ if (is_oppose_elec(target_ptr)) smart |= (SM_OPP_ELEC);
if (target_ptr->immune_elec) smart |= (SM_IMM_ELEC);
if (target_ptr->resist_fire) smart |= (SM_RES_FIRE);
- if (IS_OPPOSE_FIRE()) smart |= (SM_OPP_FIRE);
+ if (is_oppose_fire(target_ptr)) smart |= (SM_OPP_FIRE);
if (target_ptr->immune_fire) smart |= (SM_IMM_FIRE);
if (target_ptr->resist_cold) smart |= (SM_RES_COLD);
- if (IS_OPPOSE_COLD()) smart |= (SM_OPP_COLD);
+ if (is_oppose_cold(target_ptr)) smart |= (SM_OPP_COLD);
if (target_ptr->immune_cold) smart |= (SM_IMM_COLD);
-
- /* Know poison info */
if (target_ptr->resist_pois) smart |= (SM_RES_POIS);
- if (IS_OPPOSE_POIS()) smart |= (SM_OPP_POIS);
+ if (is_oppose_pois(target_ptr)) smart |= (SM_OPP_POIS);
/* Know special resistances */
if (target_ptr->resist_neth) smart |= (SM_RES_NETH);
{
HIT_POINT get_damage;
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
- bool double_resist = IS_OPPOSE_ACID();
+ bool double_resist = is_oppose_acid(creature_ptr);
/* Total Immunity */
if (creature_ptr->immune_acid || (dam <= 0))
{
HIT_POINT get_damage;
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
- bool double_resist = IS_OPPOSE_ELEC();
+ bool double_resist = is_oppose_elec(creature_ptr);
/* Total immunity */
if (creature_ptr->immune_elec || (dam <= 0))
{
HIT_POINT get_damage;
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
- bool double_resist = IS_OPPOSE_FIRE();
+ bool double_resist = is_oppose_fire(creature_ptr);
/* Totally immune */
if (creature_ptr->immune_fire || (dam <= 0))
{
HIT_POINT get_damage;
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
- bool double_resist = IS_OPPOSE_COLD();
+ bool double_resist = is_oppose_cold(creature_ptr);
/* Total immunity */
if (creature_ptr->immune_cold || (dam <= 0))
{
if (creature_ptr->oppose_acid > v) return FALSE;
}
- else if (!IS_OPPOSE_ACID())
+ else if (!is_oppose_acid(creature_ptr))
{
msg_print(_("酸への耐性がついた気がする!", "You feel resistant to acid!"));
notice = TRUE;
{
if (creature_ptr->oppose_elec > v) return FALSE;
}
- else if (!IS_OPPOSE_ELEC())
+ else if (!is_oppose_elec(creature_ptr))
{
msg_print(_("電撃への耐性がついた気がする!", "You feel resistant to electricity!"));
notice = TRUE;
{
if (creature_ptr->oppose_fire > v) return FALSE;
}
- else if (!IS_OPPOSE_FIRE())
+ else if (!is_oppose_fire(creature_ptr))
{
msg_print(_("火への耐性がついた気がする!", "You feel resistant to fire!"));
notice = TRUE;
{
if (creature_ptr->oppose_cold > v) return FALSE;
}
- else if (!IS_OPPOSE_COLD())
+ else if (!is_oppose_cold(creature_ptr))
{
msg_print(_("冷気への耐性がついた気がする!", "You feel resistant to cold!"));
notice = TRUE;
{
if (creature_ptr->oppose_pois > v) return FALSE;
}
- else if (!IS_OPPOSE_POIS())
+ else if (!is_oppose_pois(creature_ptr))
{
msg_print(_("毒への耐性がついた気がする!", "You feel resistant to poison!"));
notice = TRUE;
{
return creature_ptr->blessed || music_singing(creature_ptr, MUSIC_BLESS) || hex_spelling(HEX_BLESS);
}
+
+bool is_oppose_acid(player_type *creature_ptr)
+{
+ return creature_ptr->oppose_acid || music_singing(creature_ptr, MUSIC_RESIST) || (creature_ptr->special_defense & KATA_MUSOU);
+}
+
+bool is_oppose_elec(player_type *creature_ptr)
+{
+ return creature_ptr->oppose_elec || music_singing(creature_ptr, MUSIC_RESIST) || (creature_ptr->special_defense & KATA_MUSOU);
+}
+
+bool is_oppose_fire(player_type *creature_ptr)
+{
+ return creature_ptr->oppose_fire || music_singing(creature_ptr, MUSIC_RESIST) || (creature_ptr->special_defense & KATA_MUSOU);
+}
+
+bool is_oppose_cold(player_type *creature_ptr)
+{
+ return creature_ptr->oppose_cold || music_singing(creature_ptr, MUSIC_RESIST) || (creature_ptr->special_defense & KATA_MUSOU);
+}
+
+bool is_oppose_pois(player_type *creature_ptr)
+{
+ return creature_ptr->oppose_pois || music_singing(creature_ptr, MUSIC_RESIST) || (creature_ptr->special_defense & KATA_MUSOU);
+}
+
+bool is_tim_esp(player_type *creature_ptr)
+{
+ return creature_ptr->tim_esp || music_singing(creature_ptr, MUSIC_MIND) || (creature_ptr->concent >= CONCENT_TELE_THRESHOLD);
+}
+
+bool is_tim_stealth(player_type *creature_ptr)
+{
+ return creature_ptr->tim_stealth || music_singing(creature_ptr, MUSIC_STEALTH);
+}
#define IS_FAST(C) (C->fast || music_singing(C, MUSIC_SPEED) || music_singing(C, MUSIC_SHERO))
#define IS_INVULN(C) (C->invuln || music_singing(C, MUSIC_INVULN))
#define IS_HERO(C) (C->hero || music_singing(C, MUSIC_HERO) || music_singing(C, MUSIC_SHERO))
-#define IS_OPPOSE_ACID() (p_ptr->oppose_acid || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
-#define IS_OPPOSE_ELEC() (p_ptr->oppose_elec || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
-#define IS_OPPOSE_FIRE() (p_ptr->oppose_fire || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
-#define IS_OPPOSE_COLD() (p_ptr->oppose_cold || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
-#define IS_OPPOSE_POIS() (p_ptr->oppose_pois || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
#define IS_TIM_ESP() (p_ptr->tim_esp || music_singing(p_ptr, MUSIC_MIND) || (p_ptr->concent >= CONCENT_TELE_THRESHOLD))
#define IS_TIM_STEALTH() (p_ptr->tim_stealth || music_singing(p_ptr, MUSIC_STEALTH))
#define P_PTR_KI (p_ptr->magic_num1[0])
extern bool is_blessed(player_type *player_ptr);
+extern bool is_oppose_acid(player_type *player_ptr);
+extern bool is_oppose_elec(player_type *player_ptr);
+extern bool is_oppose_fire(player_type *player_ptr);
+extern bool is_oppose_cold(player_type *player_ptr);
+extern bool is_oppose_pois(player_type *player_ptr);
/*
* Player "food" crucial values
{
info[i++] = _("あなたは酸に対する完全なる免疫を持っている。", "You are completely immune to acid.");
}
- else if (creature_ptr->resist_acid && IS_OPPOSE_ACID())
+ else if (creature_ptr->resist_acid && is_oppose_acid(creature_ptr))
{
info[i++] = _("あなたは酸への強力な耐性を持っている。", "You resist acid exceptionally well.");
}
- else if (creature_ptr->resist_acid || IS_OPPOSE_ACID())
+ else if (creature_ptr->resist_acid || is_oppose_acid(creature_ptr))
{
info[i++] = _("あなたは酸への耐性を持っている。", "You are resistant to acid.");
}
{
info[i++] = _("あなたは電撃に対する完全なる免疫を持っている。", "You are completely immune to lightning.");
}
- else if (creature_ptr->resist_elec && IS_OPPOSE_ELEC())
+ else if (creature_ptr->resist_elec && is_oppose_elec(creature_ptr))
{
info[i++] = _("あなたは電撃への強力な耐性を持っている。", "You resist lightning exceptionally well.");
}
- else if (creature_ptr->resist_elec || IS_OPPOSE_ELEC())
+ else if (creature_ptr->resist_elec || is_oppose_elec(creature_ptr))
{
info[i++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
}
{
info[i++] = _("あなたは火に対する完全なる免疫を持っている。", "You are completely immune to fire.");
}
- else if (creature_ptr->resist_fire && IS_OPPOSE_FIRE())
+ else if (creature_ptr->resist_fire && is_oppose_fire(creature_ptr))
{
info[i++] = _("あなたは火への強力な耐性を持っている。", "You resist fire exceptionally well.");
}
- else if (creature_ptr->resist_fire || IS_OPPOSE_FIRE())
+ else if (creature_ptr->resist_fire || is_oppose_fire(creature_ptr))
{
info[i++] = _("あなたは火への耐性を持っている。", "You are resistant to fire.");
}
{
info[i++] = _("あなたは冷気に対する完全なる免疫を持っている。", "You are completely immune to cold.");
}
- else if (creature_ptr->resist_cold && IS_OPPOSE_COLD())
+ else if (creature_ptr->resist_cold && is_oppose_cold(creature_ptr))
{
info[i++] = _("あなたは冷気への強力な耐性を持っている。", "You resist cold exceptionally well.");
}
- else if (creature_ptr->resist_cold || IS_OPPOSE_COLD())
+ else if (creature_ptr->resist_cold || is_oppose_cold(creature_ptr))
{
info[i++] = _("あなたは冷気への耐性を持っている。", "You are resistant to cold.");
}
- if (creature_ptr->resist_pois && IS_OPPOSE_POIS())
+ if (creature_ptr->resist_pois && is_oppose_pois(creature_ptr))
{
info[i++] = _("あなたは毒への強力な耐性を持っている。", "You resist poison exceptionally well.");
}
- else if (creature_ptr->resist_pois || IS_OPPOSE_POIS())
+ else if (creature_ptr->resist_pois || is_oppose_pois(creature_ptr))
{
info[i++] = _("あなたは毒への耐性を持っている。", "You are resistant to poison.");
}
/* Standard damage -- also poisons player */
case GF_POIS:
{
- bool double_resist = IS_OPPOSE_POIS();
+ bool double_resist = is_oppose_pois(target_ptr);
if (fuzzy) msg_print(_("毒で攻撃された!", "You are hit by poison!"));
if (target_ptr->resist_pois) dam = (dam + 2) / 3;
/* Standard damage -- also poisons / mutates player */
case GF_NUKE:
{
- bool double_resist = IS_OPPOSE_POIS();
+ bool double_resist = is_oppose_pois(target_ptr);
if (fuzzy) msg_print(_("放射能で攻撃された!", "You are hit by radiation!"));
if (target_ptr->resist_pois) dam = (2 * dam + 2) / 5;
(void)set_stun(target_ptr, target_ptr->stun + plus_stun);
}
- if (!(target_ptr->resist_fire || IS_OPPOSE_FIRE() || target_ptr->immune_fire))
+ if (!(target_ptr->resist_fire || is_oppose_fire(target_ptr) || target_ptr->immune_fire))
{
inventory_damage(target_ptr, set_acid_destroy, 3);
}
(void)set_stun(target_ptr, target_ptr->stun + randint1(15));
}
- if ((!(target_ptr->resist_cold || IS_OPPOSE_COLD())) || one_in_(12))
+ if ((!(target_ptr->resist_cold || is_oppose_cold(target_ptr))) || one_in_(12))
{
if (!target_ptr->immune_cold) inventory_damage(target_ptr, set_cold_destroy, 3);
}
(void)set_cut(trapped_ptr,trapped_ptr->cut + randint1(dam));
if (trap_feat_type == TRAP_POISON_PIT) {
- if (trapped_ptr->resist_pois || IS_OPPOSE_POIS())
+ if (trapped_ptr->resist_pois || is_oppose_pois(trapped_ptr))
{
msg_print(_("しかし毒の影響はなかった!", "The poison does not affect you!"));
}
{
hit_trap_set_abnormal_status_p(
_("刺激的な緑色のガスに包み込まれた!", "A pungent green gas surrounds you!"),
- trapped_ptr->resist_pois || IS_OPPOSE_POIS(),
+ trapped_ptr->resist_pois || is_oppose_pois(trapped_ptr),
set_poisoned, trapped_ptr->poisoned + (TIME_EFFECT)randint0(20) + 10);
break;
}
/* Oppose Acid */
if (creature_ptr->special_defense & DEFENSE_ACID) ADD_FLG(BAR_IMMACID);
- if (IS_OPPOSE_ACID()) ADD_FLG(BAR_RESACID);
+ if (is_oppose_acid(creature_ptr)) ADD_FLG(BAR_RESACID);
/* Oppose Lightning */
if (creature_ptr->special_defense & DEFENSE_ELEC) ADD_FLG(BAR_IMMELEC);
- if (IS_OPPOSE_ELEC()) ADD_FLG(BAR_RESELEC);
+ if (is_oppose_elec (creature_ptr)) ADD_FLG(BAR_RESELEC);
/* Oppose Fire */
if (creature_ptr->special_defense & DEFENSE_FIRE) ADD_FLG(BAR_IMMFIRE);
- if (IS_OPPOSE_FIRE()) ADD_FLG(BAR_RESFIRE);
+ if (is_oppose_fire(creature_ptr)) ADD_FLG(BAR_RESFIRE);
/* Oppose Cold */
if (creature_ptr->special_defense & DEFENSE_COLD) ADD_FLG(BAR_IMMCOLD);
- if (IS_OPPOSE_COLD()) ADD_FLG(BAR_RESCOLD);
+ if (is_oppose_cold(creature_ptr)) ADD_FLG(BAR_RESCOLD);
/* Oppose Poison */
- if (IS_OPPOSE_POIS()) ADD_FLG(BAR_RESPOIS);
+ if (is_oppose_pois(creature_ptr)) ADD_FLG(BAR_RESPOIS);
/* Word of Recall */
if (creature_ptr->word_recall) ADD_FLG(BAR_RECALL);
if (target_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
if (PRACE_IS_(target_ptr, RACE_ANDROID)) dam += dam / 3;
if (target_ptr->resist_elec) dam = (dam + 2) / 3;
- if (IS_OPPOSE_ELEC())
+ if (is_oppose_elec(target_ptr))
dam = (dam + 2) / 3;
}
break;
case GF_POIS:
if (target_ptr->resist_pois) dam = (dam + 2) / 3;
- if (IS_OPPOSE_POIS()) dam = (dam + 2) / 3;
+ if (is_oppose_pois(target_ptr)) dam = (dam + 2) / 3;
break;
case GF_ACID:
if (target_ptr->muta3 & MUT3_VULN_ELEM) dam *= 2;
if (target_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
if (target_ptr->resist_acid) dam = (dam + 2) / 3;
- if (IS_OPPOSE_ACID()) dam = (dam + 2) / 3;
+ if (is_oppose_acid(target_ptr)) dam = (dam + 2) / 3;
}
break;
if (target_ptr->muta3 & MUT3_VULN_ELEM) dam *= 2;
if (target_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
if (target_ptr->resist_cold) dam = (dam + 2) / 3;
- if (IS_OPPOSE_COLD()) dam = (dam + 2) / 3;
+ if (is_oppose_cold(target_ptr)) dam = (dam + 2) / 3;
}
break;
if (PRACE_IS_(target_ptr, RACE_ENT)) dam += dam / 3;
if (target_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
if (target_ptr->resist_fire) dam = (dam + 2) / 3;
- if (IS_OPPOSE_FIRE()) dam = (dam + 2) / 3;
+ if (is_oppose_fire(target_ptr)) dam = (dam + 2) / 3;
}
break;
case GF_NUKE:
if (target_ptr->resist_pois) dam = (2 * dam + 2) / 5;
- if (IS_OPPOSE_POIS()) dam = (2 * dam + 2) / 5;
+ if (is_oppose_pois(target_ptr)) dam = (2 * dam + 2) / 5;
break;
case GF_DEATH_RAY: