int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
bool double_resist = is_oppose_acid(creature_ptr);
dam = dam * calc_acid_damage_rate(creature_ptr) / 100;
- if (dam <= 0) {
- learn_spell(creature_ptr, monspell);
+ if (dam <= 0)
return 0;
- }
if (aura || !check_multishadow(creature_ptr)) {
if ((!(double_resist || has_resist_acid(creature_ptr))) && one_in_(HURT_CHANCE))
dam = dam * calc_elec_damage_rate(creature_ptr) / 100;
- if (dam <= 0) {
- learn_spell(creature_ptr, monspell);
+ if (dam <= 0)
return 0;
- }
if (aura || !check_multishadow(creature_ptr)) {
if ((!(double_resist || has_resist_elec(creature_ptr))) && one_in_(HURT_CHANCE))
bool double_resist = is_oppose_fire(creature_ptr);
/* Totally immune */
- if (has_immune_fire(creature_ptr) || (dam <= 0)) {
- learn_spell(creature_ptr, monspell);
+ if (has_immune_fire(creature_ptr) || (dam <= 0))
return 0;
- }
dam = dam * calc_fire_damage_rate(creature_ptr) / 100;
if (aura || !check_multishadow(creature_ptr)) {
{
int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
bool double_resist = is_oppose_cold(creature_ptr);
- if (has_immune_cold(creature_ptr) || (dam <= 0)) {
- learn_spell(creature_ptr, monspell);
+ if (has_immune_cold(creature_ptr) || (dam <= 0))
return 0;
- }
dam = dam * calc_cold_damage_rate(creature_ptr) / 100;
if (aura || !check_multishadow(creature_ptr)) {
}
}
- if (monspell >= 0)
- learn_spell(creature_ptr, monspell);
-
if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE)) {
if (is_invuln(creature_ptr) && (damage < 9000)) {
if (damage_type == DAMAGE_FORCE) {