int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
bool double_resist = is_oppose_acid(creature_ptr);
- /* Total Immunity */
- if (is_immune_acid(creature_ptr) || (dam <= 0)) {
+ dam = dam * calc_acid_damage_rate(creature_ptr) / 100;
+
+ if (dam <= 0) {
learn_spell(creature_ptr, monspell);
return 0;
}
- /* Vulnerability (Ouch!) */
- dam = dam * calc_acid_damage_rate(creature_ptr) / 100;
-
if (aura || !check_multishadow(creature_ptr)) {
if ((!(double_resist || creature_ptr->resist_acid)) && one_in_(HURT_CHANCE))
(void)do_dec_stat(creature_ptr, A_CHR);
PERCENTAGE per = 100;
int i;
+ if (is_immune_acid(creature_ptr)) {
+ return 0;
+ }
+
BIT_FLAGS flgs = is_vuln_acid(creature_ptr);
for (i = 0; i < FLAG_CAUSE_MAX; i++) {
if (flgs & (0x01 << i)) {