{
if (target_ptr->blind)
msg_print(_("何か混乱するもので攻撃された!", "You are hit by something puzzling!"));
- if (target_ptr->resist_conf) {
- ep_ptr->dam *= 5;
- ep_ptr->dam /= (randint1(4) + 7);
- } else if (!check_multishadow(target_ptr)) {
+
+ ep_ptr->dam = ep_ptr->dam * calc_conf_damage_rate(target_ptr, CALC_RAND) / 100;
+
+ if (!target_ptr->resist_conf && !check_multishadow(target_ptr)) {
(void)set_confused(target_ptr, target_ptr->confused + randint1(20) + 10);
}
break;
case GF_CONFUSION:
- if (target_ptr->resist_conf)
- dam = dam * 5 / 8; /* Worst case of 5 / (d4 + 7) */
+ dam = dam * calc_conf_damage_rate(target_ptr, CALC_MAX) / 100;
break;
case GF_CHAOS:
return per;
}
+PERCENTAGE calc_conf_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode)
+{
+ PERCENTAGE per = 100;
+
+ if (creature_ptr->resist_conf) {
+ per *= 500;
+ per /= randrate(4, 7, mode);
+ }
+
+ return per;
+}
+
PERCENTAGE calc_nether_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode)
{
PERCENTAGE per = 100;
PERCENTAGE calc_lite_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_dark_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_shards_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_sound_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
+PERCENTAGE calc_conf_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_nether_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_holy_fire_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);
PERCENTAGE calc_hell_fire_damage_rate(player_type *creature_ptr, rate_calc_type_mode mode);